#!/bin/sh

export JAVA_HOME=/app/jre1.6.0_14
#JAVA_OPTS="-Dnutch.plugin.dir=/app/nutch/plugins"
export NUTCH_OPTS="-Dnutch.plugin.dir=/app/nutch/plugins"

#The basedir for nutch installation
NUTCH_HOME=.

#Number of documents to fetch per round
NUMDOCS=1000

if [ $# -lt 5 ]
then
echo Usage is \"index.sh server collection user password basedir\"
exit
fi

SERVER=$1
COLLECTION=$2
USER=$3
PASSWORD=$4
BASEDIR=$5

bin/nutch br.com.abril.hubble.nutch.indexer.HubbleIndexer $SERVER $COLLECTION $USER $PASSWORD $BASEDIR/crawldb $BASEDIR/linkdb $BASEDIR/segments/*

